package eva.savant.business.global.view

import eva.savant.businessobject.gl.Moneda
import eva.savant.businessobject.gl.Pais
import eva.savant.core.view.Maestro

import javax.faces.bean.ManagedBean
import javax.faces.bean.SessionScoped
import javax.annotation.PostConstruct

@SessionScoped
@ManagedBean(name = 'IMPais')
public class IMPais extends Maestro {

  def lsMoneda

  @PostConstruct
  public void cleanEntity() {

    entity= new Pais(); init()

    entity.moneda= new Moneda()

    lsMoneda= entityService.find('select m from ' + Moneda.canonicalName + ' m where m.operacionId > 0')
  }

  public List findLsEntity() {

    return entityService.find('select m from ' + Pais.canonicalName + ' m where m.operacionId > 0')
  }

}
